package com.lsongh.springBoot.service;

import com.lsongh.springBoot.entity.City;
import org.hibernate.mapping.Map;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface CityService extends JpaRepository<City,Integer> {

    @Query("select a from City a  where a.countrycode = ?1")
    List<City> findCityByCode(String countryCode);

}
